 Imports Microsoft.VisualBasic
Imports System
Imports System.Data
Imports System.Configuration
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls
Imports System.Collections.Generic
Imports Microsoft.Practices.EnterpriseLibrary.Data
Imports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling
Imports System.Data.Common

Partial Class UserControls_CalendarPanel
    Inherits System.Web.UI.UserControl
    Protected el As errorLog

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If (Me.ddlReasons.Items.Count = 0) Then
            LoadReasonsDDL()
        End If
    End Sub
    Protected Sub LoadReasonsDDL()
        Try
            Dim rs As New Reasons
            Dim dt As New DataTable

            dt = rs.GetAllReasons

            Me.ddlReasons.DataSource = dt
            Me.ddlReasons.DataValueField = "ReasonID"
            Me.ddlReasons.DataTextField = "ReasonName"
            Me.ddlReasons.DataBind()


        Catch ex As Exception
            el.CatchError(ex)
        End Try


    End Sub
End Class

